﻿using BCEntity.TMS.NightFreightConfiguration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.NightFreightConfiguration
{
    /// <summary>
    /// 夜间运费配置
    /// </summary>
    public interface INightFreightConfigurationData
    {
        /// <summary>
        /// 添加夜间运费配置
        /// </summary>
        /// <param name="entity">夜间运费配置信息</param>
        /// <returns></returns>
        Task<NightFreightConfigurationEntity> Insert(NightFreightConfigurationEntity entity);

        /// <summary>
        /// 获取夜间运费配置
        /// </summary>
        /// <param name="orderExtractProportion">订单抽取比例(百分比)</param>
        /// <param name="startHour">开始小时</param>
        /// <param name="startMinute">开始分钟</param>
        /// <param name="endHour">结束小时</param>
        /// <param name="endMinute">结束分钟</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<NightFreightConfigurationEntity>, int)> Query(int? orderExtractProportion, int? startHour, int? startMinute, int? endHour, int? endMinute, int pageIndex, int pageSize);

        /// <summary>
        /// 获取夜间运费配置
        /// </summary>
        /// <param name="nightFreightConfigurationId">夜间运费配置ID</param>
        /// <returns></returns>
        Task<NightFreightConfigurationEntity> GetEntity(long nightFreightConfigurationId);

        /// <summary>
        /// 修改夜间运费配置
        /// </summary>
        /// <param name="entity">夜间运费配置信息</param>
        /// <returns></returns>
        Task<NightFreightConfigurationEntity> Update(NightFreightConfigurationEntity entity);

        /// <summary>
        /// 删除夜间运费配置
        /// </summary>
        /// <param name="nightFreightConfigurationId">夜间运费配置ID</param>
        /// <returns></returns>
        Task<int> Delete(long nightFreightConfigurationId);

        /// <summary>
        /// 获取夜间运费配置列表
        /// </summary>
        /// <param name="orderExtractProportion">订单抽取比例(百分比)</param>
        /// <param name="startHour">开始小时</param>
        /// <param name="startMinute">开始分钟</param>
        /// <param name="endHour">结束小时</param>
        /// <param name="endMinute">结束分钟</param>
        /// <returns></returns>
        Task<IEnumerable<NightFreightConfigurationEntity>> GetList(int? orderExtractProportion, int? startHour, int? startMinute, int? endHour, int? endMinute);
    }
}
